//
//  NewsTableViewModel.m
//  GentlemanAnime
//
//  Created by dlios on 15-6-29.
//  Copyright (c) 2015年 lanou3g.com 蓝欧科技. All rights reserved.
//

#import "NewsTableViewModel.h"

@implementation NewsTableViewModel

//与系统关键字重名需要更改类型
-(void)setValue:(id)value forUndefinedKey:(NSString *)key
{
    if ([key isEqualToString:@"id"]) {
        self.Id = value;
    }
}

- (void)encodeWithCoder:(NSCoder *)aCoder
{
    [aCoder encodeObject:self.title forKey:@"title"];
    [aCoder encodeObject:self.Id forKey:@"Id"];
    [aCoder encodeObject:self.describe forKey:@"describe"];
    [aCoder encodeObject:self.release forKey:@"release"];
    [aCoder encodeObject:self.time forKey:@"time"];
    [aCoder encodeObject:self.browse forKey:@"browse"];
    [aCoder encodeObject:self.image forKey:@"image"];
}

- (instancetype)initWithCoder:(NSCoder *)aDecoder
{
    self = [super init];
    if (self) {
        self.title = [aDecoder decodeObjectForKey:@"title"];
        self.Id = [aDecoder decodeObjectForKey:@"Id"];
        self.describe = [aDecoder decodeObjectForKey:@"describe"];
        self.release = [aDecoder decodeObjectForKey:@"release"];
        self.time = [aDecoder decodeObjectForKey:@"time"];
        self.browse = [aDecoder decodeObjectForKey:@"browse"];
        self.image = [aDecoder decodeObjectForKey:@"image"];
}
    return self;
}


@end
